#include <iostream>
using namespace std;

void triangle(ostream&, unsigned int, unsigned int);

int main()
{
	triangle(cout, 3, 10);
	system("pause");
	return 0;
}

void triangle(ostream& o, unsigned int m, unsigned int n)
{
	if (m <= n)
	{
		for (int i = 0; i < m; i++)
		{
			o << "*";
		}
		o << endl;

		if (m < n)
		{
			triangle(o, m + 1, n);
		}

		for (int i = 0; i < m; i++)
		{
			o << "*";
		}
		o << endl;
	}
	else
	{
		cout << "error invalid indata" << endl;
	}
}